package cn.xopencode.userservice.enums;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 性别
 */
public enum GenderEnum implements IntArrayValuable {

    GENDER0(0, "未知"),
    GENDER1(1, "男"),
    GENDER2(2, "女");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(GenderEnum::getGender).toArray();

    /**
     * 性别标识
     */
    private final Integer gender;
    /**
     * 描述
     */
    private final String name;

    GenderEnum(Integer gender, String name) {
        this.gender = gender;
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
